import { createApp, defineComponent } from "vue";
import App from "./App.vue";
import AntDesignVue from "ant-design-vue";
import "ant-design-vue/dist/antd.min.css";
import "./index.css";

const app = createApp(App);


// 修改后：
// app.use(AntDesignVue);
// let zIndex = 1000; // 初始 z-index 值
app.use(AntDesignVue as any, {
  popupContainer: () => document.body,
});

//引入字体图标
import "@/../public/iconfont/iconfont.css";

//自定义组件
import {
  colorLineConfig,
  colorLineWidget,
  colorLineSetting,
} from "./components/custom-components/color-line";

//注册低代码解析器
import pageRender from "@/components/low-code/page-render/entry/index";
app.use(pageRender, {
  custom: [
    {
      config: colorLineConfig, //配置项
      widget: colorLineWidget, //组件`
    },
  ],
});

//注册低代码设计器
import pageDesigner from "@/components/low-code/page-designer/entry/index";
app.use(pageDesigner, {
  custom: [
    {
      config: colorLineConfig, //配置项
      widget: colorLineWidget, //组件
      setting: colorLineSetting, //组件设置
    },
  ],
});

app.mount("#app");
